// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // »Project« Talina Gaming System (TgS) (∂) // »File« TgS (PS3) Common - Math API [Vector] [M] [S].inl // »Author« Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com) // »Version« 4.0 // ------------------------------------------------------------------------------------------------------------------------------ // // Copyright: © 2002-2010, Andrew Aye. All Rights Reserved. // This software is free for non-commercial use. Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // Redistributions of source code must retain this copyright notice, this list of conditions and the following disclaimers. // Redistributions in binary form must reproduce this copyright notice, this list of conditions and the following // disclaimers in the documentation and other materials provided with the distribution. // Neither the names of the copyright owner nor the names of its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // The intellectual property rights of the algorithms used reside with Andrew Aye. You may not use this software, in whole or // in part, in support of any commercial product without the express written consent of the author. // There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is". // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // #if !defined(_TGS_PS3_COMMON___MATH_API_VECTOR_M_S_INL_) #define _TGS_PS3_COMMON___MATH_API_VECTOR_M_S_INL_ #pragma once // START TGS - MATH //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ---- VECTOR 4 - INIT --------------------------------------------------------------------------------------------------------- // TgINLINE TgVEC_M_F32_04 M_SET_ELEM_F32_04( C_TgFLOAT32 fX, C_TgFLOAT32 fY, C_TgFLOAT32 fZ, C_TgFLOAT32 fW ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_SETP_ELEM_F32_04( C_TgFLOAT32 fX, C_TgFLOAT32 fY, C_TgFLOAT32 fZ ) { return (M_SET_ELEM_F32_04( fX, fY, fZ, 1.0F )); } TgINLINE TgVEC_M_F32_04 M_SETV_ELEM_F32_04( C_TgFLOAT32 fX, C_TgFLOAT32 fY, C_TgFLOAT32 fZ ) { return (M_SET_ELEM_F32_04( fX, fY, fZ, 0.0F )); } TgINLINE TgVEC_M_F32_04 M_SETP_F32_04( C_TgVEC_M_F32_04 tvRight ) { return (M_OR_F32_04( TgKV_UNIT_W_F32_04.m_mData, M_AND_F32_04( tvRight, TgKV_FFF0.m_f32_v04.m_mData ) )); } TgINLINE TgVEC_M_F32_04 M_SETV_F32_04( C_TgVEC_M_F32_04 tvRight ) { return (M_AND_F32_04( tvRight, TgKV_FFF0.m_f32_v04.m_mData )); } // ---- HOMOGENEOUS THREE ELEMENT DOT PRODUCT ----------------------------------------------------------------------------------- // TgINLINE TgVEC_M_F32_04 M_DOT3_VV_F32_04( C_TgVEC_M_F32_04 tvLeft, C_TgVEC_M_F32_04 tvRight ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_CX_F32_04( C_TgVEC_M_F32_04 tvLeft, C_TgVEC_M_F32_04 tvRight ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_UCX_F32_04( C_TgVEC_M_F32_04 tvLeft, C_TgVEC_M_F32_04 tvRight ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } TgINLINE TgVEC_M_F32_04 M_UCX_LEN_F32_04( PCU_TgVEC_M_F32_04 ptvRet_Length, C_TgVEC_M_F32_04 tvLeft, C_TgVEC_M_F32_04 tvRight ) { return ((TgKV_UNIT_X_F32_04.m_mData)); } // Quaternion - Functions TgINLINE TgVOID M_QT_MUL_F32_04( PCU_TgVEC_M_F32_04 a, C_TgVEC_M_F32_04 b, C_TgVEC_M_F32_04 c ) { } TgINLINE TgVOID M_QT_SLERP_F32_04( PCU_TgVEC_M_F32_04 a, C_TgVEC_M_F32_04 b, C_TgVEC_M_F32_04 c, C_TgVEC_M_F32_04 d ) { } TgINLINE TgVOID M_QT_VECTOR_TO_VECTOR_F32_04( PCU_TgVEC_M_F32_04 a, C_TgVEC_M_F32_04 b, C_TgVEC_M_F32_04 c ) { } #endif // END ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////